Add window type an shape to window print for nicer debugging
authorAlexander Larsson <alexl@redhat.com>
Fri, 28 Aug 2009 10:48:13 +0000 (12:48 +0200)
committerAlexander Larsson <alexl@redhat.com>
Mon, 31 Aug 2009 13:06:01 +0000 (15:06 +0200)
gdk/gdkwindow.c

index 47c47fa1f9a7a11ade0ac6978c0c4101b6fcbba4..0418629799f839a2e48fa86f1a0e2a82db07fc4d 100644 (file)
@@ -9638,6 +9638,15 @@ gdk_window_print (GdkWindowObject *window,
                  int indent)
 {
   GdkRectangle r;
+  const char *window_types[] = {
+    "root",
+    "toplevel",
+    "child",
+    "dialog",
+    "temp",
+    "foreign",
+    "offscreen"
+  };
 
   g_print ("%*s%p: [%s] %d,%d %dx%d", indent, "", window,
           window->user_data ? g_type_name_from_instance (window->user_data) : "no widget",
@@ -9652,9 +9661,15 @@ gdk_window_print (GdkWindowObject *window,
 #endif
     }
 
+  if (window->window_type != GDK_WINDOW_CHILD)
+    g_print (" %s", window_types[window->window_type]);
+
   if (window->input_only)
     g_print (" input-only");
 
+  if (window->shaped)
+    g_print (" shaped");
+
   if (!gdk_window_is_visible ((GdkWindow *)window))
     g_print (" hidden");